export default {
    namespaced: true,
    state: {
        userInfo: {
            name: '小花',
            skills: ['抖音', 'B站', '美团'],
            address: '武汉黑马',
            logo: 'https://vuejs.org/images/logo.svg'
            //  https://www.runoob.com/wp-content/uploads/2016/02/react.png
        }
    },
    mutations:{
        // 第一个参数不用传入。
        // 第二个参数可选
        'setLogo': function(state, obj){
            // console.log(state, newLogo, newName)
            state.userInfo.logo = obj.newLogo
            state.userInfo.name = obj.newName
        },

        setSkill: function(state, newSkills) {
            state.userInfo.skills = newSkills
        }
    }
}